package com.qhm123.spark.restlet;

import java.util.Map;

import org.restlet.data.MediaType;
import org.restlet.ext.freemarker.TemplateRepresentation;
import org.restlet.representation.Representation;
import org.restlet.resource.ServerResource;

public class BaseServerResource extends ServerResource {

	@Override
	public BoooooApplication getApplication() {
		return (BoooooApplication) super.getApplication();
	}

	protected Representation toRepresentation(Map<String, Object> map,
			String templateName, MediaType mediaType) {
		return new TemplateRepresentation(templateName, getApplication()
				.getConfiguration(), map, mediaType);
		// return null;
	}
}
